using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using LinqOverView.Models.Mapping;

namespace LinqOverView.Models
{
    public partial class AllDemoDBContext : DbContext
    {
        static AllDemoDBContext()
        {
            Database.SetInitializer<AllDemoDBContext>(null);
        }

        public AllDemoDBContext()
            : base("Name=AllDemoDBContext")
        {
        }

        public DbSet<Customer> Customers { get; set; }
        public DbSet<Purchase> Purchases { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CustomerMap());
            modelBuilder.Configurations.Add(new PurchaseMap());
        }
    }
}
